// MainForm.cpp : implementation file
//

#include "stdafx.h"
#include "VersionCheckerForm.h"
#include <string>


std::string GetDllVersion(const char* dllname)
{
	const char* val = "";
	HMODULE hdll = ::LoadLibraryA(dllname);
	typedef const char* func();
	func* fp = (func*)GetProcAddress(hdll,"DllGetVersion");
	if(fp!=NULL)
	{	
		val = fp();
	}
	::FreeLibrary(hdll);
	return val;


}

// CVersionCheckerForm dialog

IMPLEMENT_DYNAMIC(CVersionCheckerForm, CBaseForm)

CVersionCheckerForm::CVersionCheckerForm(CWnd* pParent /*=NULL*/)
	: CBaseForm(CVersionCheckerForm::IDD, pParent)
{

}

CVersionCheckerForm::~CVersionCheckerForm()
{
}

void CVersionCheckerForm::DoDataExchange(CDataExchange* pDX)
{
	CBaseForm::DoDataExchange(pDX);
}


BEGIN_MESSAGE_MAP(CVersionCheckerForm, CBaseForm )

	ON_BN_CLICKED(IDC_BUTTON_OPENDLLS, &CVersionCheckerForm::OnBnClickedButtonOpendlls)
END_MESSAGE_MAP()

CString CVersionCheckerForm::GetTitle() const
{
	return _T("VersionChecker Form");
}

BOOL CVersionCheckerForm::AllowClose()
{
	//throw std::exception("The method or operation is not implemented.");
	return TRUE;
}







// CVersionCheckerForm message handlers

void CVersionCheckerForm::OnBnClickedButtonOpendlls()
{
	// TODO: Add your control notification handler code here



}


BOOL CVersionCheckerForm::OnInitDialog()
{
	CBaseForm::OnInitDialog();

	return TRUE;  // return TRUE  unless you set the focus to a control
}

// xxxx.cpp : Defines the entry point for the console application.
//

